<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="bp" value="${pageContext.request.contextPath}"></c:set>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<jsp:useBean id="timestamp" class="java.util.Date"/>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="format-detection" content="telephone=no" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<link href="${bp}/static/css/bksystem.css" rel="stylesheet" type="text/css" />
	<link href="${bp}/static/skin/black/skin.css" rel="stylesheet" type="text/css" id="skin" />
	<link href="${bp}/static/css/module.css" rel="stylesheet" type="text/css" />
	<link href="${bp}/static/font/iconfont.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="page-wrapper">
	<div class="row">
		<div class="col-md-12">
			<h1 class="page-header">快速订购</h1>
		</div>
		<!-- /.col-lg-12 -->
	</div>
	<div class="row">
		<div class="col-md-8">

			<table class="table table-striped table-bordered table-hover">
				<thead>
				<tr>
					<th style="width: 12%">序号</th>
					<th style="width: 20%">用户名</th>
					<th style="width: 10%">密码</th>
					<td style="width: 14%">操作</td>
				</tr>
				</thead>
				<tbody>
				<c:forEach items="${userlist}" var="keyword" varStatus="id">
					<tr>
						<td>${keyword.id}</td>
						<td>${keyword.username}</td>
						<td>${keyword.password}</td>
						<td><button onclick="quierk(${keyword.id})">删除</button></td>
					</tr>
				</c:forEach>
				</tbody>
			</table>

		</div>

	</div>
</div>
<!-- /#page-wrapper -->

</div>

</body>
<script src="${bp}/static/js/jquery-1.9.1.min.js"></script>
<script src="${bp}/static/js/jquery.cookie.js" type="text/javascript"></script>
<script src="${bp}/static/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="${bp}/static/js/BKframe.js" type="text/javascript"></script>
<script src="${bp}/static/js/html5shiv.js" type="text/javascript"></script>
<script src="${bp}/static/js/css3-mediaqueries.js" type="text/javascript"></script>
<script type="text/javascript">

	function quierk(id) {
		$.ajax({
			type:"get",
			url:"${bp}/user/deletebyid",
			data:{"id":id},
			success : function (msg) {
				if(msg == 1){
					alert("删除成功")
					window.location.reload()
				}else{
					alert("删除失败")
				}
			}
		})
	}
</script>
</html>

